Ext.define('appmod.view.knowledge.category.UserGroupPermAssignForm', {
    extend: 'Ext.form.Panel',
    alias: [
		'widget.knowledge.category.usergrouppermassignform' ,
		'widget.knowledge-category-usergrouppermassignform'],
	region : 'center',
	bodyPadding: 10,
	requires: [
		'appmod.view.knowledge.category.UserGroupPermList'
	],
	
	constructor: function (config) {
		
		if (config.fieldStores) {
			this.fieldStores = config.fieldStores;
		}
        this.callParent(arguments);
     },
	
    initComponent: function() {
        var me = this;
		
		var fieldStores = me.fieldStores;

		var groupAuthList = null;
		// --- init store ---
		try {
			groupAuthList = fieldStores['dsPerm'];
		} catch (e) {
			Ext.log({
				msg : '[appmod.view.knowledge.category.UserPermAssignForm]' + e,
				level:'error'
			});
		}	
		
        
        Ext.applyIf(me, {
            items: [
				{
					xtype: 'hiddenfield',
					name: 'id'
				},
				{
					xtype: 'hiddenfield',
					name: 'categoryId'
				},								
                {
                    xtype: 'displayfield',
                    fieldLabel: '分类名称',
					name:'categoryName',
					labelWidth: 70,
                    anchor: '95%'
                },
				{
					xtype:'knowledge.category.usergrouppermlist',
					anchor: '99%',
					store:groupAuthList,
					height:300
				}

            ]
        });
        
        me.callParent(arguments);
    }
});